package com.sright.bcard.content.share.service;

import com.aliyuncs.exceptions.ClientException;
import com.sright.bcard.common.service.share.dto.LoginUser;
import com.sright.bcard.common.service.share.dto.content.AdminDTO;
import com.sright.bcard.common.service.share.dto.content.CardDTO;
import com.sright.bcard.common.service.share.dto.content.UserDTO;
import com.sright.bcard.content.share.request.CardSaveParam;
import com.sright.bcard.user.share.request.TokenParam;
import com.sright.bcard.enterprise.share.request.CardListParam;
import com.sright.common.response.SrightResponse;

import java.text.ParseException;

/**
 * @author peter
 * @description
 * @date 2020/5/25
 */
public interface UserService {

    /**
     * 保存名片
     * @param: param
     * @return com.sright.common.response.SrightResponse
     * @author jinxuebin
     * @date 2020/6/3 9:16 上午
    */
    SrightResponse save(CardSaveParam param);

    /**
     * 获取名片开通情况
     * @return com.sright.common.response.SrightResponse
     * @author jinxuebin
     * @date 2020/6/3 1:24 下午
     */
    SrightResponse getJoinCount(LoginUser loginUser);

    /**
     * 发送短信验证码
     * @param adminDTO
     * @return
     */
    SrightResponse smsSend(AdminDTO adminDTO) throws ClientException;

    /**
     * 重置密码
     * @param adminDTO
     * @return
     */
    SrightResponse resetPassword(AdminDTO adminDTO);

    /**
     * 校验验证码
     * @param adminDTO
     * @return
     */
    SrightResponse checkCode(AdminDTO adminDTO);

    /**
     * 通过企业登录账号获取联系人手机号
     * @param mobile
     * @return
     */
    SrightResponse contactsMobile(String mobile);

    /**
     * 名片解绑
     * @param cardDTO
     * @return
     */
    SrightResponse<Integer> unbind(CardDTO cardDTO);

    /**
     * 获取名片设置
     * @param enterpriseId
     * @return
     */
    SrightResponse getSetting(Long enterpriseId);

    /**
     * 删除名片
     * @param id
     * @return
     */
    SrightResponse deleteCard(Long id);

    /**
     * 获取用户信息(小程序端)
     * @param tokenParam
     * @return
     */
    SrightResponse getUserInfo(TokenParam tokenParam);


    /**
     * 分页查询名片列表
     * @param cardListParam
     * @return
     */
    SrightResponse cardList(CardListParam cardListParam) throws ParseException;

    /**
     * 分页查询用户列表
     * @param cardListParam
     * @return
     */
    SrightResponse userList(CardListParam cardListParam);

    /**
     * 编辑员工信息
     * @param userDTO
     * @return
     */
    Boolean updateUser(UserDTO userDTO);

    /**
     * 员工信息详情
     * @param id
     * @return
     */
    SrightResponse userDetail(Long id);

    /**
     * 修改员工信息
     * @param param
     * @return
     */
    SrightResponse updateCard(CardSaveParam param);

    /**
     * 企业到期天数查询
     * @param enterpriseId
     * @return
     */
    SrightResponse expireDays(Long enterpriseId);

    void updateCheckStatus(Long cardUserId, Integer checkStatus);
}
